﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class OrderConfirmation : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
            ShowMessage();
    }

    private void ShowMessage()
    {
        if (Session["OrderConfirmId"] != null)
        {
            string orderNumber = Session["OrderConfirmId"].ToString();
            Session["OrderConfirmId"] = null;
            if (orderNumber.Length > 0)
            {
                lblConfirmation.Text = "Your order number is " + orderNumber +
                                       " and you will be contacted to confirm this order.";
            }
            else
                Response.Redirect("Default.aspx", true);
        }
        else
            Response.Redirect("Default.aspx", true);
    }
}
